package com.yihu.cms.service;

import java.io.IOException;

import com.yihu.cms.bean.comment.Comment;
import com.yihu.cms.dataService.hessian.interfaceService.CommentHService;
import com.yihu.dataService.hessian.resource.ResourceMongoDBManager;
import com.yihu.web.bean.vo.CommentQuery;


public class CommentService{
	CommentHService commentService = null;
	public CommentService(){
		try {
			commentService= (CommentHService)ResourceMongoDBManager
					.getSingleton().getBeans("commentServiceHSC");
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	public Object add(Comment comment) {
		// TODO Auto-generated method stub
		return commentService.addComment(comment);
	}

	public Object delete(String id) {
		// TODO Auto-generated method stub
		return commentService.deleteComment(id);
	}
	
	public Object get(String id) {
		// TODO Auto-generated method stub
		return commentService.getComment(id);
	}

	public Object getComments(CommentQuery query) {
		// TODO Auto-generated method stub
		return commentService.getComments(query);
	}
	
	public Object updateComment(Comment comment) {
		// TODO Auto-generated method stub
		return commentService.updateComment(comment);
	}
	
}
